package com.common.www.redis;

import com.common.www.utils.JwtUtils;

import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration;

import javax.annotation.PostConstruct;


@Configuration
public class RedisSessionConfiguration extends RedisHttpSessionConfiguration {


    //    初始化参数
    @PostConstruct
    @Override
    public void init() {
        super.init();
        super.setMaxInactiveIntervalInSeconds(JwtUtils.TOKEN_EXP_S);//session超时时间(单位秒)
    }
}

